package com.handsome.观察者模式;

/**
 * @author niechun
 * @date 2023/3/19 16:00
 */
public class BaiduObserver implements Observer{
    private String temperature;
    private String pressure;
    private String humidity;


    @Override
    public void update(String temperature,String pressure,String humidity) {
        this.temperature = temperature;
        this.pressure = pressure;
        this.humidity = humidity;
        display();
    }

    public void display(){
        System.out.println("baidu weather temperature:"+temperature);
        System.out.println("baidu weather pressure:"+pressure);
        System.out.println("baidu weather humidity:"+humidity);

    }
}
